<?xml version='1.0' encoding='UTF-8' ?>
<!--
    Document   : baseProperty
    Created on : Jan 28, 2012, 12:14:06 PM
    Author     : Oscar Ivan Prado
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:icecore="http://www.icefaces.org/icefaces/core"
                xmlns:ace="http://www.icefaces.org/icefaces/components"
                xmlns:ice="http://www.icesoft.com/icefaces/component"
                template ="/WEB-INF/facelets/base/controls/DataTable.xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:param name="rows" value="5"/>
    <ui:define name="dataTableOptions">

    </ui:define>
    <ui:define name="columns">
        <ice:column style="background-color: white">
            <ice:panelGrid columns="2">
                <ice:panelCollapsible  style="width: 100%" actionListener="#{tablesBackingBean.exploreObject(var)}" >
                    <f:facet name="header">
                        <ice:panelGroup style="width: 100%" >
                            <ice:panelGrid columns="2">
                                <ice:commandButton image="#{var.used ? '/resources/images/checked.png' : '/resources/images/unchecked.png' }" actionListener="#{tablesBackingBean.objectSelected(var)}"/>
                                <ice:outputText value="#{var.name}" style="text-transform: uppercase"/>
                            </ice:panelGrid>
                        </ice:panelGroup>
                    </f:facet>
                    <ice:panelGroup>
                        <c:forEach var="child" items="#{var.attributeChilds}">
                            #{child.name}
                        </c:forEach>
                        <ice:dataTable value="#{var.attributeChilds}" var="child">
                            <ice:column>
                                #{child.name}
                            </ice:column>
                        </ice:dataTable>
                    </ice:panelGroup>
                </ice:panelCollapsible>
            </ice:panelGrid>
        </ice:column>
    </ui:define>
</ui:composition>